<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>css实现一个div向右平移100px的动画</title>
    <style>
      .container{
        width: 100px;
        height: 100px;
        background-color: red;
        animation: move 1s linear infinite;
      }
      @keyframes move {
        0% {
          transform: translateX(0);
        }
        100% {
          transform: translateX(100px);
        }
      }
    </style>
  </head>
  <body>
    <div class="container"></div>
  </body>
</html>
